package com.pet.behavior.controller;


import com.pet.behavior.service.ApReadBehaviorService;
import com.pet.common.controller.AbstractController;
import com.pet.model.behavior.dtos.ReadBehaviorDto;
import com.pet.model.behavior.pojos.ApReadBehavior;
import com.pet.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
* APP阅读行为表 控制器</p>
*/
@RestController
@RequestMapping("/api/readBehavior")
public class ApReadBehaviorController extends AbstractController<ApReadBehavior>{

    private ApReadBehaviorService apReadBehaviorService;

    //注入
    @Autowired
    public ApReadBehaviorController(ApReadBehaviorService apReadBehaviorService) {
        super(apReadBehaviorService);
        this.apReadBehaviorService=apReadBehaviorService;
    }

    /**
     * 阅读行为记录
     */
    @PostMapping
    public ResponseResult readBehavior(@RequestBody ReadBehaviorDto dto){
        return apReadBehaviorService.readBehavior(dto);
    }
}

